<?php
// +----------------------------------------------------------------------
// | 专利详情页
// +----------------------------------------------------------------------
// | Copyright (c) 2015
// +----------------------------------------------------------------------
// | Author: baiping 125618036@qq.com http://www.webipcode.com
// +----------------------------------------------------------------------
// |2015-12-9 下午5:40:17
// +----------------------------------------------------------------------
?>
<?php $this->load->view('public/header');?>
<link href="<?php echo __STATIC__?>jsshow/css/bootstrap-modal-bs3patch.css" rel="stylesheet" />
<link href="<?php echo __STATIC__?>jsshow/css/bootstrap-modal.css" rel="stylesheet" />
<div class="page-intro">
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<ol class="breadcrumb">
					<li>
						<a href="<?php echo $webinfo['WEB_URL'] ?>">首页</a>
					</li>
					<li>
						<a href="javascript:void(0);">专利</a>
					</li>
					<li><?php echo $patent_info->title?></li>
				</ol>
			</div>
		</div>
	</div>
</div>
<div class="container">
	<p></p>
	<div class="row">
		<!-- 左侧 -->
		<div class="col-md-3">
			<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
				<?php foreach ( $catgory_list as $ckey => $cval ){?>
				<div class="panel panel-default">
					<div class="panel-heading" role="tab" id="heading<?php echo $cval->id;?>">
						<h4 class="panel-title">
							<a role="button" data-toggle="collapse" data-parent="#accordion"
								href="#collapse<?php echo $cval->id;?>"
								aria-expanded="<?php if($cat_id == $ckey){?>true<?php }else{?>false<?php }?>"
								aria-controls="collapse<?php echo $cval->id;?>"
								<?php if($cat_id != $ckey){?>class="collapsed"<?php }?>
								> <?php echo $cval->title;?> </a>
						</h4>
					</div>
					<div id="collapse<?php echo $cval->id;?>" class="panel-collapse collapse <?php if($cat_id == $ckey){?> in<?php }?>" role="tabpanel" aria-labelledby="heading<?php echo $cval->id;?>">
						<div class="panel-body">
							 <ul class="nav nav-pills nav-stacked nav-pills-stacked-example">
							 <?php foreach ( $cval->patent as $key => $val ){?>
							 	<li <?php if($id == $val->id){?>class="active"<?php }?>><a href="<?php echo site_url('patent/detail/'.$ckey.'/'.$val->id);?>"><?php echo $val->title; ?></a></li>
							 <?php }?>	
							 </ul>
						</div>
					</div>
				</div>
			<?php }?>		
			</div>

		</div>
		<!-- 右侧 -->
		<div class="col-md-9">
			<!-- 产品展示 -->
			<?php if( $status == 0 ){?>
			<div class="col-md-5">
				<img src="/Uploads/<?php echo $patent_info->thumb_path;?>"
					class="img-responsive img-rounded">
			</div>
			<div class="col-md-7">
				<h4 class="pro_title"><?php echo $patent_info->title?></h4>
				<p class="text-left instro"><?php echo cutstr_html($patent_info->server_instro,180); ?></p>
				<?php if( !empty( $patent_info->office_type ) ){?>
				<h4>官方减缓</h4>
				<div id="officer">
				<?php
				$office_price_arr = unserialize ( $patent_info->office_price );
				foreach ( $office_price_arr as $key => $val ) {
					?>
					<a href="javascript:void(0);">
						<span class="btn btn-white" data-id="<?php echo $key?>"
							data-price="<?php echo $val;?>"><?php echo $catgory[$key]?></span>
					</a>
				<?php }?>
				</div>
				<?php }?>
				<span class="clearfix"></span>
				<ul class="list-icons">
					<li>
						<i class="fa fa-users"></i>
					<?php echo $patent_info->title?>：￥<i id="server_price"><?php echo $patent_info->service_price;?></i>
						元
						<span class="text-danger">(服务费)</span>
					</li>
					<?php if( !empty( $patent_info->office_type ) ){?>
					<li>
						<i class="fa fa-bank"></i>
					<?php echo $patent_info->title?>：￥<i id="officer_price">0</i>
						元
						<span class="text-danger">(官费)</span>
					</li>
					<?php }?>
					<h4 class="tota_price text-danger">
						<i class="fa fa-archive"></i>
						费用总计：
						<i id="total_price"><?php echo $patent_info->service_price + $patent_info->officer_price?></i>
						元
					</h4>
					<input type="hidden" name="patent_id" value="<?php echo $id;?>" >
					<input type="hidden" name="cat_id" value="<?php echo $cat_id?>" >
					<a href="javascript:void(0);" onclick="join_patent();" class="btn btn-success">立即申请</a>
					<a href="http://wpa.qq.com/msgrd?V=3&uin=513158622&Site=知标网&Menu=yes" class="btn btn-danger">专家咨询</a>
			</div>
			<!-- 详情介绍 -->
			<div class="bs-example bs-example-tabs"
				data-example-id="togglable-tabs">
				<ul id="myTabs" class="nav nav-tabs" role="tablist">
					<li class="active" role="presentation">
						<a id="home-tab" aria-expanded="true" aria-controls="home"
							data-toggle="tab" role="tab" href="#home">服务介绍</a>
					</li>
					<li class="" role="presentation">
						<a id="profile-tab" aria-controls="profile" data-toggle="tab"
							role="tab" href="#profile" aria-expanded="false">办理流程</a>
					</li>
					<li class="" role="presentation">
						<a id="info-tab" aria-controls="info" data-toggle="tab"
							href="#info" role="tab" aria-expanded="false"> 所需资料 </a>
					</li>
					<li class="" role="presentation">
						<a id="problem-tab" aria-controls="problem" data-toggle="tab"
							role="tab" href="#problem" aria-expanded="false">常见问题</a>
					</li>
				</ul>
				<div id="myTabContent" class="tab-content">
					<div id="home" class="tab-pane fade active in"
						aria-labelledby="home-tab" role="tabpanel">
						<p class="instro_sty"><?php echo $patent_info->server_instro;?></p>
					</div>
					<div id="profile" class="tab-pane fade"
						aria-labelledby="profile-tab" role="tabpanel">
						<p class="instro_sty"><?php echo $patent_info->process;?></p>
					</div>
					<div id="info" class="tab-pane fade" aria-labelledby="info-tab"
						role="tabpanel">
						<p class="instro_sty"><?php echo $patent_info->required_information;?></p>
					</div>
					<div id="problem" class="tab-pane fade"
						aria-labelledby="problem-tab" role="tabpanel">
						<p class="instro_sty"><?php echo $patent_info->problem;?> </p>
					</div>
				</div>
			</div>
			<!-- 产品详情不存在 -->
			<?php }else{?>
			<div class="alert alert-info" role="alert">
				<span class="alert-link">此类别下暂无内容</span>
			</div>
			<?php }?>
		</div>
	</div>
</div>
<?php $this->load->view('public/footer');?>
